<admintpl file="header" />
<style>
.well{font-size:12px;}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{
padding:0px;
}
.table>thead>tr>th{border-bottom:none;}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-search" method="post" action="admin.php?g=Admin&m=Userpaisys&a=index">
                <input type="text" id="search_name" name="name" style="width:190px;" value="{$postData['name']}" placeholder="请输入用户ID/手机号/昵称"> 
				&nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" /> &nbsp;&nbsp;
			&nbsp;<a href="javascript:;" id="goExp" class="btn btn-primary"> 导出 </a>
			<script type="text/javascript">
			        
		            $(function() {
		            	$("#newold").change(function(){
		            		var _qu=$("#qu").val();
		            		var _nj=$(this).val();
		            		//window.location.href="admin.php?g=Admin&m=Studentsys&a=index&qu="+_qu+'&nj='+_nj;
		            	});
		            	$("#goExp").click(function(){
		            		var _name=$("#search_name").val();
		            		window.location.href="http://climb-game.51wom.com/chuang/?c=ex-pai&gid={$gameId}&name="+_name;
				        });
		            });
	            </script>
	            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您查看的是：
				<select name="game" id="game" style="width:280px;">
				    <foreach name="gameInfo" item="game">
				       <option value="{$game.id}" <if condition="$gameId == $game['id']">selected="selected"</if> >{$game.name}</option>
				    </foreach>
 
				 </select> 数据 
			<script type="text/javascript">
		            $(function() {
		            	$("#game").change(function(){
		            		var _gid=$("#game").val();
		            		window.location.href="admin.php?g=Admin&m=Userpaisys&a=index&gid="+_gid;
		            	});
		            });
	            </script>
		</form>
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="30">排名</th>
						<th width="90">用户信息</th>
						<th width="60">手机号</th>
						<th width="60">积分</th>
						<th width="60">备注</th>
						<th width="60">获奖情况</th>
						<th width="60">操作</th>
					</tr>
				</thead>
				<foreach name="thedata" item="data">
					<tr>
						<td><b>{$data['pid']}</b></td>
						<td><b><img width="46" src="{$data['headimg']}"> {$data['nickname']}</b></td>
						<td><b>{$data['phone']}</b></td>
						<td><b>{$data['fen']}</b></td>
						<td><b>{$data['beizhu']}</b></td>
						<td><b>
						<if condition="1 == $data['ishuojiang']">获奖</if>
						</b></td>
						<td><b><a style="color:#000000;" href="admin.php?g=Admin&m=Userpaisys&a=edit&id={$data['openid']}&p={$postData['p']}">编辑</a></b></td>
					</tr>	
				</foreach>			
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="public/js/common.js"></script>
	<script>
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量复制
				$('.js-articles-copy').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/index.php?g=portal&m=AdminPost&a=copy&ids="+ ids, {
						title : "批量复制",
						width : "300px"
					});
				});
				//批量移动
				$('.js-articles-move').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/admin.php?g=portal&m=AdminPost&a=move&old_term_id=0&ids="+ ids, {
						title : "批量移动",
						width : "300px"
					});
				});
			});
		});
	</script>
</body>
</html>